package cn.nfwx.tv.helper;

import android.text.InputFilter;
import android.text.Spanned;
import android.text.TextUtils;

/**
 * Created by dell on 2017/12/26.
 */

public class EditNullFilter implements InputFilter {

    @Override
    public CharSequence filter(CharSequence source, int start, int end, Spanned dest, int dstart, int dend) {
        if (TextUtils.equals(source, " ")) {
            return "";
        }
        if (TextUtils.equals(source, "  ")) {
            return "";
        }
        return null;
    }
}
